package com.forum.entity;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.forum.annotation.Excel;
import com.forum.utils.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.poi.ss.formula.functions.T;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;

/**
 * @ClassNameAboutUs
 * @Author 张继成
 * @Date 2023/11/10 14:36
 */
@Data
@ApiModel(description = "关于我们作者")
@TableName("systemintro")
public class AboutUsentity implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 创建时间 */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addtime;

    /** 标题 */
    @ApiModelProperty(value = "标题")
    @Excel(name = "标题")
    private String title;

    /** 副标题 */
    @ApiModelProperty(value = "副标题")
    @Excel(name = "副标题")
    private String subtitle;

    /** 内容 */
    @ApiModelProperty(value = "内容")
    @Excel(name = "内容")
    private String content;

    /** 图片1 */
    @ApiModelProperty(value = "图片1")
    @Excel(name = "图片1")
    private String picture1;

    /** 图片2 */
    @ApiModelProperty(value = "图片2")
    @Excel(name = "图片2")
    private String picture2;

    /** 图片3 */
    @ApiModelProperty(value = "图片3")
    @Excel(name = "图片3")
    private String picture3;

    public AboutUsentity(){

    }
    public AboutUsentity(T t){
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
